﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ylh.BLL;
using System.Data;

using ExtAspNet;

public partial class Module_StaffManger_StaffManger : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            BindDeTv();

        }

    }

    private void BindDeTv()
    {

        Tree1.Nodes.Clear();

        Ylh.BLL.DepartmentBLL debll = new DepartmentBLL(DbConnectionStr);

        DataTable dt = debll.GetDepartMentInfo(-1);

        ExtAspNet.TreeNode tn;
        foreach (DataRow dr in dt.Rows)
        {
            tn = new ExtAspNet.TreeNode();
            tn.NavigateUrl = "~/Module/StaffManger/StaffManger.aspx?DeID=" + dr["DepartmentID"].ToString();
            tn.Target = "main";
            tn.Text = dr["DepartmentName"].ToString();

            Tree1.Nodes.Add(tn);

        }


    }
    protected void BtnReflash_Click(object sender, EventArgs e)
    {
        BindDeTv();
    }
}